Operating Systems
December 31, 2025
Example 1: We have limited RAM, and we want to run more programs that can be stored.
Example 2: We have two process (producer / consumer); how do they communicate?
printf() contains internal buffers and state; an interruption can lead to corrupted bufferswrite() a newline or whatever to signify the signal was caught.write() a new promptdisplay_prompt()?
write() it could be fine. If it’s using printf() it isn’tThe child should immediately reset signal handling to the default
Look up signal()’s man
sigaction() is newer than signal()man 7 signal)